home *** CD-ROM | disk | FTP | other *** search
/ JAAOS on CD-ROM Update 1998 / JAAOS On CD-ROM Update 1998.iso / mac / Data / JAAOS / 00001.ls next >
Encoding:
Text File  |  1999-01-16  |  2.1 KB  |  85 lines

  1. global theDelim, gWhichBit, gAcrobatFile, gSearchFile, gAcrobatPath, acroSearchPath
  2.  
  3. on startMovie
  4.   if the machineType = 256 then
  5.     baRegister("Wheeler Multimedia Consulting", 10217590)
  6.     set theDelim to "\"
  7.   else
  8.     set theDelim to ":"
  9.   end if
  10.   checkVersion()
  11.   checkAcrobat()
  12. end
  13.  
  14. on checkVersion
  15.   if the machineType = 256 then
  16.     set os to baVersion("os")
  17.     if os = "Win16" then
  18.       set gWhichBit to "16"
  19.     else
  20.       set gWhichBit to "32"
  21.     end if
  22.   end if
  23. end
  24.  
  25. on checkAcrobat
  26.   if the machineType = 256 then
  27.     set gAcrobatPath to baFindApp("pdf")
  28.   else
  29.     set gAcrobatPath to baFindApp("CARO")
  30.   end if
  31.   set acroStatus to baFileExists(gAcrobatPath)
  32.   if acroStatus <> 1 then
  33.     go("1")
  34.   else
  35.     set the itemDelimiter to theDelim
  36.     set pathNum to the number of items in gAcrobatPath - 1
  37.     if the machineType = 256 then
  38.       if gWhichBit = 32 then
  39.         set acroSearchPath to item 1 to pathNum of gAcrobatPath & "\Plug_ins\asrch32.api"
  40.       else
  41.         set acroSearchPath to item 1 to pathNum of gAcrobatPath & "\Plug_ins\acrosrch.api"
  42.       end if
  43.     else
  44.       set acroSearchPath to item 1 to pathNum of gAcrobatPath & ":Plug-Ins:Acrobat‚Ñ¢ Search"
  45.     end if
  46.     set acroSearchStatus to baFileExists(acroSearchPath)
  47.     if acroSearchStatus <> 1 then
  48.       go("1")
  49.     else
  50.       go("2")
  51.     end if
  52.   end if
  53.   set the itemDelimiter to ","
  54. end
  55.  
  56. on installAcrobat
  57.   if the machineType = 256 then
  58.     set installerFile to the pathName & "ReadSrch\rs" & gWhichBit & "e301.exe"
  59.   else
  60.     set installerFile to the pathName & "Reader+Search:Reader:Reader 3.01 Installer"
  61.   end if
  62.   open(installerFile)
  63.   halt()
  64. end
  65.  
  66. on launchPDF
  67.   baOpenFile(the pathName & "home.pdf", "maximised")
  68. end
  69.  
  70. on AcroStop
  71.   set WinHandle to []
  72.   set WinHandle to baWindowList(EMPTY, "Acrobat", 0)
  73.   set maxWins to count(WinHandle)
  74.   if maxWins > 0 then
  75.     repeat with X = 1 to maxWins
  76.       set WindowNumber to getAt(WinHandle, X)
  77.       baCloseWindow(WindowNumber)
  78.       baActivateWindow(WindowNumber)
  79.       if baWindowList(EMPTY, "Acrobat", 0) = [] then
  80.         exit repeat
  81.       end if
  82.     end repeat
  83.   end if
  84. end
  85.